<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <!-- import CSS -->
    <link
      rel="stylesheet"
      href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css"
    />
  </head>
  <body>
    <div id="app">
      <el-select v-model="value" placeholder="请选择">
        <!-- 如果属性的值是变量 则需要加上：变成属性绑定 -->
        <el-option v-for="p in arr" :label="p.title" :value="p.price"></el-option>
      </el-select>
      <h1>{{ value }}</h1>
    </div>
  </body>
  <!-- import Vue before Element -->
  <script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
  <!-- import JavaScript -->
  <script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
  <script>
    let v = new Vue({
      el: "#app",
      data: function () {
        return {
          value: "",
          arr: [
            { title: "小米手机", price: 3000 },
            { title: "华为手机", price: 8000 },
            { title: "联想手机", price: 2000 },
          ],
        };
      },
      methods: {},
    });
  </script>
</html>
